@echo off
chcp 65001 >nul
echo APIPost接口文档生成器
echo ====================
echo.

echo 检查Python环境...
python --version
if errorlevel 1 (
    echo 错误：未找到Python环境，请确保Python已正确安装
    pause
    exit /b 1
)

echo.
echo 检查依赖包...
pip show python-docx >nul 2>&1
if errorlevel 1 (
    echo 正在安装python-docx依赖包...
    pip install python-docx
    if errorlevel 1 (
        echo 错误：依赖包安装失败
        pause
        exit /b 1
    )
)

echo.
echo 开始生成文档...
python main.py

echo.
echo 完成！按任意键退出...
pause >nul
